package _10文件转码案例;

import java.io.*;

public class Demo {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("D:\\黑马java培训班\\资料\\内网通下载文件\\教师端\\gbk_file.txt"),"GBK");
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("day11\\abd\\utf8_file.txt"),"utf8");

        char[] chars = new char[1024];
        int read;
        while ((read=isr.read(chars))!=-1){
            osw.write(chars,0,read);
        }
        osw.close();
        isr.close();
    }
}
